using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace TroTro
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class RightTireHealth
    {
        private TroTro _trotro;
        private readonly Game _game;
        private Texture2D _rightTireTexture;
        private Texture2D _carFrame;

        public RightTireHealth(Game game, TroTro trotro)
        {
            _game = game;
            _trotro = trotro;
        }

        public void LoadContent(ContentManager content, string assetName)
        {
            _rightTireTexture = content.Load<Texture2D>(assetName);
            _carFrame = content.Load<Texture2D>(assetName);
        }

        public void Draw(SpriteBatch sBatch)
        {
            foreach (var gc in _game.Components.Where(gc => gc is TroTro))
            {
                _trotro = (TroTro) gc;
            }

            sBatch.Draw(_carFrame, new Rectangle(10, 620, 50, 70), Color.Black);
        }
    }
}
